package nbp.currency.data;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;

import nbp.currency.logic.CurrencyType;
import nbp.currency.logic.entity.Currency;
import nbp.currency.logic.entity.CurrencyExchange;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;

public class Main {

	public static void main(String[] args) {
		
		System.out.println();
		
//
//		HolidayDAO session = new HolidayDAOImpl();
//		
//		Calendar as = Calendar.getInstance();
//		as.set(2014, 11,27);
//		
//		Date lastWorkingDateBefore = session.getLastWorkingDateBefore(as.getTime());
//		System.out.println(lastWorkingDateBefore);
//		Currency Currency = (Currency)session.get(Currency.class, 8l);
//		System.out.println(Currency.getCurrency());
//		System.out.println(Currency.getDescription());
//		System.out.println(Currency.getId());
		
//		CurrencyExchange test = new CurrencyExchange();
//		test.setDate(new Date());
//		test.setCurrency((Currency)session.load(Currency.class, 8l));
//		test.setCurrency(new Currency("USD", "dolarek"));
//		test.setConverter(100);
//		test.setAverageExchange(BigDecimal.ZERO);
//		
//		session.persist(test);
		
	}

}
